package wortubung.util;

import java.io.IOException;

public abstract class PrintableDelegate implements Printable {

	private Printable prompt;

	protected PrintableDelegate(Printable prompt) {
		this.prompt = prompt;
	}

	public Printable getPrintable() {
		return prompt;
	}

	public void prompt(Object... msg) {
		prompt.prompt(msg);
	}

	public void promptf(String fmt, Object... vals) {
		prompt.promptf(fmt, vals);
	}

	public void promptfln(String fmt, Object... vals) {
		prompt.promptfln(fmt, vals);
	}

	public void promptln(Object... msg) {
		prompt.promptln(msg);
	}

	public void promptln(String msg, boolean emptyLine) {
		prompt.promptln(msg, emptyLine);
	}

	public void promptln() {
		prompt.promptln();
	}

	public void print(String msg) {
		prompt.print(msg);
	}

	public void printf(String fmt, Object... vals) {
		prompt.printf(fmt, vals);
	}

	public void printfln(String fmt, Object... vals) {
		prompt.printfln(fmt, vals);
	}

	public void println(String msg) {
		prompt.println(msg);
	}

	public void println() {
		prompt.println();
	}

	public void error(Throwable t) {
		prompt.error(t);
	}

	public void error(Object... msg) {
		prompt.error(msg);
	}

	public void openOutputFile(String fileName) throws IOException {
		prompt.openOutputFile(fileName);
	}

    public void closeOutputFile() throws IOException {
    	prompt.closeOutputFile();
    }

	public boolean isPrinting() {
		return prompt.isPrinting();
	}

	public void setPrinting(boolean printing) {
		prompt.setPrinting(printing);
	}
}
